<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		
		window.onload=function () {
			

			a = document.getElementsByTagName('p');

			a[0].style.color = "red";

			bb = document.getElementsByClassName('box')

			// bb[0]
			// 
			box = document.getElementById('box');

			box.style.color= "3434";

			box1 = document.getElementsByClassName('box1');

			aaa = document.getElementsByTagName("p")[0].getElementsByClassName('box1');

			// $('p .box1').html('sdfsdfsdfsd')

			console.log(aaa);

			console.log(box1);
		}

	</script>
</head>
<body>
	<p>
		<a class="box1" href="">百度</a>
	</p>
	<span class="box">学并思</span>
	<span id="box">学并思</span>
	<div>
		<a class="box1" href="">百度</a>
	</div>
	<p>sdfsdf</p>
</body>
</html>